﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using LotroData;

namespace LotroDataHarness
{
    class Program
    {
        static void Main(string[] args)
        {
            var cred = LotroCredential.FromXml("D:\\cred.ldc");

            var req = new LotroXmlRequest(cred);


            Console.Write("Item ID= ");
            var id = int.Parse(Console.ReadLine());

            var item = req.GetItemSheet(id);

            var itemLoaded = LotroItem.LoadFromXml(item);


            //var xdoc = req.GetCharacterSheet("Rocharan", LotroWorld.Elendilmir);

            //var character = LotroCharacter.LoadFromXml(xdoc);

            //var guild = LotroGuild.LoadFromXml(req.GetGuildRoster("Southern Cross", LotroWorld.Elendilmir));

            //foreach (var item in character.Equipment.Values)
            //{
            //    try
            //    {
            //        var itemx = req.GetItemSheet(item.Id);
            //        var newItem = LotroItem.LoadFromXml(itemx); 
            //    }
            //    catch (LotroException e)
            //    {
            //        Console.WriteLine(e.Message);
            //    }
            //}
           
            //Console.Read();
        }
    }
}
